package com.zhongjianjian.jiaoan.jiaoyanjiekoumidengxing.config;

import com.zhongjianjian.jiaoan.jiaoyanjiekoumidengxing.lanjieqi.ForCheckInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * @类名: com.zhongjianjian.jiaoan.jiaoyanjiekoumidengxing.config
 * @作者: lgt
 * @创建时间: 2020-02-29 19:33
 * @描述:
 **/
@Configuration
public class MyConfig extends WebMvcConfigurationSupport {

    @Autowired
    private ForCheckInterceptor forCheckInterceptor;

    @Override
    protected void addInterceptors(InterceptorRegistry registry){
        registry.addInterceptor(forCheckInterceptor).addPathPatterns("/check/**");
    }
}
